import axiosHttp from "../../http"

//首页数据查询
async function orderData(data) {
  console.log(data)
  return axiosHttp({
    url: "/order/getorderdata",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

//待发货数据查询
async function toBeShippedData(data) {
  console.log(data)
  return axiosHttp({
    url: "/order/gettobeshippeddata",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

//删除订单
async function delOrder(data) {
  console.log(data)
  return axiosHttp({
    url: "/order/delorder",
    method: "post",
    data,
  }).then((res) => {
    return res
  })
}

export default {
  orderData,
  toBeShippedData,
  delOrder,
}
